package com.portal.system.mqListener;//package com.portal.system.mqListener;
//
//import com.portal.common.core.constant.MQConstants;
//import org.springframework.amqp.core.*;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RabbitMQConfiguration {
//
//    /**
//     * 声明邮件队列
//     */
//    @Bean
//    public Queue emailQueue() {
//        return QueueBuilder.durable(MQConstants.EMAIL_QUEUE).build();
//    }
//
//    /**
//     * 声明邮件交换机
//     */
//    @Bean
//    public TopicExchange emailExchange() {
//        return ExchangeBuilder.directExchange(MQConstants.EMAIL_EXCHANGE).durable(true).build();
//    }
//
//    /**
//     * 绑定邮件队列和交换机
//     */
//    @Bean
//    public Binding emailBinding(Queue emailQueue, TopicExchange emailExchange) {
//        return BindingBuilder
//                .bind(emailQueue)
//                .to(emailExchange)
//                .with(MQConstants.EMAIL_ROUTING_KEY);
//    }
//}
